﻿<%@ Page Language="C#" AutoEventWireup="true" Codebehind="SelectNguoiGui.aspx.cs" Inherits="CMS.Web.CompDenu.SelectNguoiGui" %>
<script language="javascript" type="text/javascript" src="../Common/util.js"></script>
<script language="javascript" type="text/javascript" src="../Common/jquery.js"></script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Chọn người gửi đơn</title>    
    <style type="text/css">
    .divframe {background-color:white;border:1px solid #D5D5D5;font-size:12px;
    height:300px;margin:2px;overflow:auto;padding:1px;width:240px;float:left;}
    </style>
</head>
<body style="margin:0px" class="">
    <form id="form1" runat="server">        
        <div>
            <asp:ListBox ID="lstNguoiGui" runat="server" Rows="16"  Width="98%" CssClass="ListBox" DataTextField="HoTen" DataValueField="ID" ></asp:ListBox>
        </div> 
        <br style="clear:both;" />
        <table class="Table_Border" style="border-collapse: collapse" cellspacing="0" cellpadding="0" width="100%" border="0">
            <tr class="Row_Button">
                    <td align="center">
                        <input type="button" class="Button" value="Đồng ý" onclick="selectNguoiGui()" />&nbsp;
                        <input type="button" class="Button" value="Hủy bỏ" onclick="window.close()" /></td>
                </tr>
        </table>     
    </form>
    <script type="text/javascript"> 
        function selectNguoiGui(){
            if(window.opener){
                parentWindow =  window.opener;
            }else{
                parentWindow = window.dialogArguments;
            }
             var lstNguoiGui = document.getElementById("<%=lstNguoiGui.ClientID %>");
            var txtTenNguoiGui = parentWindow.document.getElementById("<%=ObjId%>");
            var hidId = parentWindow.document.getElementById("<%=HidId%>");    
            hidId.value = lstNguoiGui.options[lstNguoiGui.selectedIndex].value;
            txtTenNguoiGui.value = lstNguoiGui.options[lstNguoiGui.selectedIndex].text;
            window.close();            
        }
    </script>    
</body>
</html>
